<div id="content_header">
  <h3>Create a new Course Schedule</h3>
</div>

<div class="row">
  <form name="courseScheduleForm" role="form" ng-submit="updateCourseSchedule()">

    <div class="form-group">
      <label for="TermId">
        Term
      </label>
      <select name="TermId" class="form-control" id="TermId" ng-model="currentCourseSchedule.TermId" ng-options="term.Id as formatTerm(term) group by term.Year for term in terms" required>
        <option value="" ng-hide="currentCourseSchedule.TermId">Select Term.</option>
      </select>
    </div>

    <div class="form-group">
      <label for="TimeClassId">
        Time
      </label>
      <select name="TimeClassId" class="form-control" id="TimeClassId" ng-model="currentCourseSchedule.TimeClassId" ng-options="timeclass.TimeClassId as label(timeclass.StartTime, timeclass.EndTime) for timeclass in timeclasses" required>
        <option value="" ng-hide="currentCourseSchedule.TimeClassId">Select Time.</option>
      </select>
    </div>

    <div class="form-group">
      <label for="DayClassId">
        Day
      </label>
      <select name="DayClassId" class="form-control" id="DayClassId" ng-model="currentCourseSchedule.DayClassId" ng-options="dayclass.DayClassId as dayclass.DayRange for dayclass in dayclasses" required>
        <option value="" ng-hide="currentCourseSchedule.DayClassId">Select Day.</option>
      </select>
    </div>

    <div class="form-group">
      <label for="ClassroomId">
        Classroom
      </label>
      <select name="ClassroomId" class="form-control" id="ClassroomId" ng-model="currentCourseSchedule.ClassroomId" ng-options="classroom.ClassroomId as classroom.Code +' - '+ classroom.ClassroomName for classroom in rooms" required>
        <option value="" ng-hide="currentCourseSchedule.ClassroomId">Select Classroom.</option>
      </select>
    </div>

    <div class="form-group">
      <label for="CourseId">
        Course
      </label>
      <select name="CourseId" class="form-control" id="CourseId" ng-model="currentCourseSchedule.CourseId" ng-options="course.CourseId as course.Code +' - '+ course.CourseName for course in courses" required>
        <option value="" ng-hide="currentCourseSchedule.CourseId">Select Course.</option>
      </select>
    </div>

    <div class="form-group">
      <label for="fee">Fee</label>
      <input type="number" name="fee" id="fee" class="form-control" ng-model="currentCourseSchedule.Fee" required>
    </div>

    <button type="submit" class="btn btn-primary" >Submit</button>
  </form>
</div>